1982A - Soccer - CodeForces Solution


greedy implementation math

Please click on ads to support us..

Python Code:

t=int(input())
for i in range(t):
  x1,y1=map(int,input().split())
  x2,y2=map(int,input().split())
  d1=x1-y1
  d2=x2-y2
  if(d1>0 and d2>0) or (d1<0 and d2<0):
      print("YES")
  else:
      print("NO")


Comments

Submit
0 Comments
More Questions

1041C - Coffee Break
507A - Amr and Music
1041D - Glider
1486A - Shifting Stacks
1389B - Array Walk
71B - Progress Bar
701A - Cards
545A - Toy Cars
1538E - Funny Substrings
234A - Lefthanders and Righthanders
1611D - Weights Assignment For Tree Edges
197A - Plate Game
1474A - Puzzle From the Future
6B - President's Office
1405B - Array Cancellation
431C - k-Tree
101A - Homework
1642C - Great Sequence
1523B - Lord of the Values
1406C - Link Cut Centroids
2409. Count Days Spent Together
2410. Maximum Matching of Players With Trainers
1604C - Di-visible Confusion
997A - Convert to Ones
218A - Mountain Scenery
486B - OR in Matrix
1405A - Permutation Forgery
1733A - Consecutive Sum
1733B - Rule of League
1733C - Parity Shuffle Sorting